<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>游戏浏览</title>
<link href="${backPath}/images/skin.css" rel="stylesheet"
	type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
	font-size: 12px
}

.STYLE1 {
	font-size: 12px
}

.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}

a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}

a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}

a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}

.STYLE7 {
	font-size: 12
}
-->
</style>
<script type="text/javascript" language="javascript">
var  highlightcolor='#E6EDF2';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
	source=event.srcElement;
	if  (source.tagName=="TR"||source.tagName=="TABLE")
	return;
	while(source.tagName!="TD")
	source=source.parentElement;
	source=source.parentElement;
	cs  =  source.children;
	//alert(cs.length);
	if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
	for(i=0;i<cs.length;i++){
		cs[i].style.backgroundColor=highlightcolor;
	}
	}

	function  changeback(){
	if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
	return
	if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
	//source.style.backgroundColor=originalcolor
	for(i=0;i<cs.length;i++){
		cs[i].style.backgroundColor="";
	}
	}

//全选按钮
function checkAll() 
{
	for (var i = 0; i < document.getElementsByName("checkbox").length; i++) {
	   document.getElementsByName("checkbox")[i].checked = document.getElementById("selectAll").checked;
	  }
	 }

//删除所有记录
function test(){
	if(window.confirm('确定要删除这些记录吗')){		    
		if(document.getElementsByName("checkbox").length != 0){	
			if(document.getElementById("selectAll").checked){
				if(window.confirm('确定要删除这些记录吗')){
				    var form=document.getElementById("deleteBatchForm");					   
					form.submit();
				}
			}else{
		      alert("请点击［全选］");
			}
		}else{
			alert("没有任何记录可供选择!");
		}
}
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="17" valign="top"
			background="${backPath}/images/mail_leftbg.gif"><img
			src="${backPath}/images/left-top-right.gif" width="17" height="29" /></td>
		<td valign="top" background="${backPath}/images/content-bg.gif">
		<table width="100%" height="31" border="0" cellpadding="0"
			cellspacing="0" class="left_topbg" id="table2">
			<tr>
				<td height="31">
				<div class="titlebt">游戏管理</div>
				</td>
			</tr>
		</table>
		</td>
		<td width="16" valign="top"
			background="${backPath}/images/mail_rightbg.gif"><img
			src="${backPath}/images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr>
		<td valign="middle" background="${backPath}/images/mail_leftbg.gif">&nbsp;</td>
		<td valign="top" bgcolor="#F7F8F9">
		<table width="100%" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td height="30">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="15" height="30"><img
							src="${backPath}/images/list/tab_031.gif" width="15" height="30" /></td>
						<td width="951" background="${backPath}/images/list/tab_051.gif"><img
							src="${backPath}/images/list/311.gif" width="16" height="16" />
						<span class="STYLE4">游戏列表</span></td>
						<form action="/card/list_GameByTitle.action" method="post">
						<td width="500px" background="${backPath}/images/list/tab_051.gif" style="font-size:12px">游戏名称：
						<input type="text" style="width: 80px;height:14px" name="gameTitle" /> <input
							type="submit" id="search" value="查询" style="height:18px"></td>
						</form>
						<td width="281" background="${backPath}/images/list/tab_051.gif">
						<table border="0" align="right" cellpadding="0" cellspacing="0"
							width="250px">
							<tr>
								<td width="113">
								<table width="90%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="STYLE1">
										<div align="center"><img
											src="${backPath}/images/list/001.gif" alt="" width="14"
											height="14" /></div>
										</td>
										<td class="STYLE1">
										<div align="center"><a
											href="${backPath}/club/gameup.jsp">游戏上传</a></div>
										</td>
									</tr>
								</table>
								</td>
								<td width="71">
								<table width="87%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="STYLE1">
										<div align="center"><input type="checkbox"
											name="checkbox62" value="checkbox" id="selectAll"
											onclick="checkAll()" /></div>
										</td>
										<td class="STYLE1" width="50px">
										<div align="center">全选</div>
										</td>
									</tr>
								</table>
								</td>
								<td width="66">
								<table width="88%" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="STYLE1">
										<div align="center"><img
											src="${backPath}/images/list/083.gif" width="14" height="14"
											onclick="test()" /></div>
										</td>
										<td class="STYLE1">
										<div align="center">删除</div>
										</td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
						<td width="14"><img src="${backPath}/images/list/tab_071.gif"
							width="14" height="30" /></td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="9" background="${backPath}/images/list/tab_121.gif">&nbsp;</td>
						<td bgcolor="#EEF2FB">
						<table width="99%" border="0" align="center" cellpadding="0"
							cellspacing="1" bgcolor="#9EAEB9" onMouseOver="changeto()"
							onmouseout="changeback()">
							<tr>
								<td width="5%" height="26"
									background="${backPath}/images/list/tab_141.gif" class="STYLE1">
								<div align="center" class="STYLE2 STYLE1">选择</div>
								</td>
								<td width="18%" height="26"
									background="${backPath}/images/list/tab_141.gif" class="STYLE1">
								<div align="center" class="STYLE2 STYLE1">游戏名称</div>
								</td>
								<td width="44%" background="${backPath}/images/list/tab_141.gif"
									class="STYLE1">
								<div align="center" class="STYLE2 STYLE1">游戏说明</div>
								</td>
								<td width="16%" height="26"
									background="${backPath}/images/list/tab_141.gif" class="STYLE1">
								<div align="center" class="STYLE2">上传时间</div>
								</td>
								<td width="10%" height="26"
									background="${backPath}/images/list/tab_141.gif" class="STYLE1">
								<div align="center" class="STYLE2">删除</div>
								</td>
							</tr>
							<form name="deleteBatchForm" id="deleteBatchForm"
								action="deleteBatch_Game.action"><c:forEach
								items="${pager.resultList}" var="game">
								<tr>
									<td height="18" bgcolor="#FFFFFF">
									<div align="center" class="STYLE1"><input name="checkbox"
										type="checkbox" class="STYLE2" value="${game.gameid}" /></div>
									</td>
									<td height="18" bgcolor="#FFFFFF">
									<div align="center" class="STYLE2 STYLE1"><A
										href="/card/view_Game.action?id=${game.gameid}">${game.gametitle}</A></div>
									</td>
									<td bgcolor="#FFFFFF">
									<div align="center" class="STYLE2 STYLE1">${game.gamedesc}</div>
									</td>
									<td height="18" bgcolor="#FFFFFF">
									<div align="center">${game.uploaddate}</div>
									</td>
									<td height="18" bgcolor="#FFFFFF">
									<div align="center"><span class="STYLE2"><img
										src="${backPath}/images/list/010.gif" width="9" height="9" />
									</span><span class="STYLE1">[</span><a
										href="/card/delete_Game.action?id=${game.gameid}"
										onclick="return confirm('确定要删除吗')">删除</a><span class="STYLE1">]</span></div>
									</td>
								</tr>
							</c:forEach></form>
						</table>
						</td>
						<td width="9" background="${backPath}/images/list/tab_161.gif">&nbsp;</td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td height="29">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="15" height="29"><img
							src="${backPath}/images/list/tab_201.gif" width="15" height="29" /></td>
						<td background="${backPath}/images/list/tab_211.gif">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="25%" height="29" nowrap="nowrap"><span
									class="STYLE1">共${pager.rowCount}条纪录，当前第${pager.pageNo}/${pager.pageCount}页，每页${pager.pageSize}条纪录</span></td>
								<td width="75%" valign="top" class="STYLE1">
								<div align="right">
								<table width="352" height="20" border="0" cellpadding="0"
									cellspacing="0">
									<tr>
										<td width="62" height="22" valign="middle">
										<div align="right"><a
											href="list_Game.action?pageNo=${pager.firstPageNo}"><img
											src="${backPath}/images/list/first1.gif" width="39"
											height="17" /></a></div>
										</td>
										<td width="50" height="22" valign="middle">
										<div align="right"><a
											href="list_Game.action?pageNo=${pager.prePageNo}"><img
											src="${backPath}/images/list/back1.gif" width="45"
											height="17" /></a></div>
										</td>
										<td width="54" height="22" valign="middle">
										<div align="right"><a
											href="list_Game.action?pageNo=${pager.nextPageNo}"><img
											src="${backPath}/images/list/next1.gif" width="45"
											height="17" /></a></div>
										</td>
										<td width="49" height="22" valign="middle">
										<div align="right"><a
											href="list_Game.action?pageNo=${pager.lastPageNo}"><img
											src="${backPath}/images/list/last1.gif" width="39"
											height="17" /></a></div>
										</td>
										<td width="59" height="22" valign="middle">
										<div align="right">转到第</div>
										</td>

										<form action="list_Game.action" method="post" name="listForm">
										<td width="25" height="22" valign="middle"><span
											class="STYLE7"> <input type="text" class="STYLE1"
											style="height: 15px; width: 25px;" size="5" name="pageNo" />
										</span></td>
										<td width="23" height="22" valign="middle">页</td>
										<td width="30" height="22" valign="middle"><img
											src="${backPath}/images/list/go1.gif" width="39" height="17"
											onclick="listForm.submit();" /></td>
										</form>
									</tr>
								</table>
								</div>
								</td>
							</tr>
						</table>
						</td>
						<td width="14"><img src="${backPath}/images/list/tab_221.gif"
							width="14" height="29" /></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
		<td background="${backPath}/images/mail_rightbg.gif">&nbsp;</td>
	</tr>
	<tr>
		<td valign="bottom" background="${backPath}/images/mail_leftbg.gif"><img
			src="${backPath}/images/buttom_left2.gif" width="17" height="17" /></td>
		<td background="${backPath}/images/buttom_bgs.gif"><img
			src="${backPath}/images/buttom_bgs.gif" width="17" height="17"></td>
		<td valign="bottom" background="${backPath}/images/mail_rightbg.gif"><img
			src="${backPath}/images/buttom_right2.gif" width="16" height="17" /></td>
	</tr>
</table>
</body>
</html>